////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef _CPLANECAMERA_H_
#define _CPLANECAMERA_H_

////////////////////////////////////////////////////////////////////////////////////////////////////

#include "CGlobals.h"
#include "position2d.h"
#include "ISceneNodeAnimator.h"

////////////////////////////////////////////////////////////////////////////////////////////////////

class CPlaneCameraAnimator : public ISceneNodeAnimator
{
public:
	CPlaneCameraAnimator (ICameraSceneNode* camera, vector3df e1, vector3df e2);

	bool isEventReceiverEnabled () const;
	bool OnEvent (const SEvent& event);

	virtual ISceneNodeAnimator* createClone(ISceneNode* node,
				ISceneManager* newManager=0){ return 0; }

	void animateNode (ISceneNode* node, u32 timeMs);	

	void setZoom ();
	void setZoom (float zoom);

private:
	ICameraSceneNode* m_camera;
	vector3df m_e1;
	vector3df m_e2;

	vector3df m_e1_save, m_e2_save;

	bool m_rightMousePressed;
	bool m_leftMousePressed;
	position2di m_mouseStartPos;
	vector3df m_cameraStartPos;

	float m_zoom;
};

#endif
////////////////////////////////////////////////////////////////////////////////////////////////////
